package sy.service;

import spring.annotation.Component;
import spring.beans.BeanPostProcessor;
import spring.core.PriorityOrdered;

/**
 * 自定义处理bean
 */
//@Component
public class MyBeanPostProcessor2 implements BeanPostProcessor, PriorityOrdered {

    /**
     * @param bean
     * @param beanName
     * @return
     */
    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws Exception {
        System.out.println("执行初始化之后2");
        return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName);
    }
}
